import { ChatOpenAI } from "@langchain/openai";
import { HumanMessage } from '@langchain/core/messages';

export const deepseek = (content: string) => {
    // options
    process.env['OPENAI_API_KEY'] = 'sk-df50cc45c0ee4fc387486b8b42dbe73f';
    process.env['OPENAI_BASE_URL'] = 'https://api.deepseek.com/v1/';

    const chat = new ChatOpenAI({ model: 'deepseek-chat' });
    return chat.stream([new HumanMessage({ content })]);
};

export const chatbro = (content: string) => {
    // options
    process.env['OPENAI_API_KEY'] = 'sk-9MmQUPP02CikLbmH76A85eDe9dF2433a8070D9D5EaDfA76e';
    process.env['OPENAI_BASE_URL'] = 'https://gpt.0kk.top/v1/';

    const chat = new ChatOpenAI({ model: 'gpt-3.5-turbo' });
    return chat.stream([new HumanMessage({ content })]);
};